//引入mongoose模块
let mongoose = require('mongoose');
//创建目标集合的模型对象
let courseSchema = new mongoose.Schema({
    name: String,
    credit: Number,
    classAttribute: Number
});
//建立模型队形与数据库中数据集合的关联关系
let courseModel = mongoose.model('courseModel', courseSchema, 'course');